package com.zsk.shop.controller.app;

import com.zsk.shop.api.order.OrderStatus;
import com.zsk.shop.common.base.BaseResponse;
import com.zsk.shop.model.results.PackageResult;
import com.zsk.shop.service.DeliveryAddressStatusService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Ys
 * @date 2021年12月07日 15:02
 */
@RestController
@Api(tags = "商城-物流包裹信息")
@RequestMapping("/shop/package")
public class DeliveryAddressStatusController {

    @Resource
    private DeliveryAddressStatusService deliveryAddressStatusService;

    @GetMapping(value = "/getPackageList.do")
    @ApiOperation("查看物流包裹列表")
    public BaseResponse<PackageResult> getPackageList(String orderNo){
        return deliveryAddressStatusService.getPackageList(orderNo);
    }

    @GetMapping(value = "/getPackageStatus.do")
    @ApiOperation("获取订单物流信息")
    public BaseResponse getOrderStatus(String number){
        return BaseResponse.success(OrderStatus.getOrderInfo(number));
    }


}
